<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditCustomerTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditCustomerLabel_idCustomer}" for="idCustomer" />
                    <h:inputText id="idCustomer" value="#{customerController.selected.idCustomer}" title="#{bundle.EditCustomerTitle_idCustomer}" required="true" requiredMessage="#{bundle.EditCustomerRequiredMessage_idCustomer}"/>
                    <h:outputLabel value="#{bundle.EditCustomerLabel_customerCode}" for="customerCode" />
                    <h:inputText id="customerCode" value="#{customerController.selected.customerCode}" title="#{bundle.EditCustomerTitle_customerCode}" required="true" requiredMessage="#{bundle.EditCustomerRequiredMessage_customerCode}"/>
                    <h:outputLabel value="#{bundle.EditCustomerLabel_customerName}" for="customerName" />
                    <h:inputText id="customerName" value="#{customerController.selected.customerName}" title="#{bundle.EditCustomerTitle_customerName}" required="true" requiredMessage="#{bundle.EditCustomerRequiredMessage_customerName}"/>
                    <h:outputLabel value="#{bundle.EditCustomerLabel_phone}" for="phone" />
                    <h:inputText id="phone" value="#{customerController.selected.phone}" title="#{bundle.EditCustomerTitle_phone}" />
                    <h:outputLabel value="#{bundle.EditCustomerLabel_address}" for="address" />
                    <h:inputText id="address" value="#{customerController.selected.address}" title="#{bundle.EditCustomerTitle_address}" />
                    <h:outputLabel value="#{bundle.EditCustomerLabel_balance}" for="balance" />
                    <h:inputText id="balance" value="#{customerController.selected.balance}" title="#{bundle.EditCustomerTitle_balance}" />
                    <h:outputLabel value="#{bundle.EditCustomerLabel_other}" for="other" />
                    <h:inputText id="other" value="#{customerController.selected.other}" title="#{bundle.EditCustomerTitle_other}" />
                    <h:outputLabel value="#{bundle.EditCustomerLabel_tempFlag}" for="tempFlag" />
                    <h:inputText id="tempFlag" value="#{customerController.selected.tempFlag}" title="#{bundle.EditCustomerTitle_tempFlag}" />
                </h:panelGrid>
                <h:commandLink action="#{customerController.update}" value="#{bundle.EditCustomerSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditCustomerViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{customerController.prepareList}" value="#{bundle.EditCustomerShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditCustomerIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
